﻿using UnityEngine;
using System.Collections;

public class DeathParticle : MonoBehaviour 
{
    public float lifeTime = 10f;
    float time = 0.0f;

    void Start()
    {
        particleSystem.playbackSpeed = 0.2f;
        time = Time.time + lifeTime;
    }

    void Update()
    {
        if (time < Time.time)
            Destroy(gameObject);
    }
}
